/**
 * The main application class. An instance of this class is created by app.js when it calls
 * Ext.application(). This is the ideal place to handle application launch and initialization
 * details.
 */
Ext.define('tPAXXAdminDesktop.System', {
    requires: ['tPAXXAdminDesktop.Common.desktop.Module'],
    singleton: true,
    sApp: null,
    setSApp: function(sApp) {
        var me = tPAXXAdminDesktop.System;
        me.sApp = sApp;
    },
    application: function(name, config) {
        config = config || {};
        var me = tPAXXAdminDesktop.System;
        config.sApp = me.sApp;
        var instance = null;

        instance = Ext.create(name, config);
        if (instance instanceof tPAXXAdminDesktop.Common.desktop.Module) {
            
        } else {
            instance = null;
        }

        return instance;
    }
});